<template>
	<view class="body">
		<view class="item" :class="index==0?'item1':index==1?'item2':'item3'" v-for="(item,index) in list" :key="">
			<view class="title">{{item.name}}</view>
			<view class="tip" v-if="index==0">最新动态尽快掌握</view>
			<view class="tip" v-if="index==1">您身边开店的好助手</view>
			<view class="tip" v-if="index==2">热门海报素材应有尽有</view>
			<button class="btn" @click="goJingang(item)">点击查看{{arrow}}</button>
		</view>
		<!-- <view class="item item2">
			<view class="title">爆客助手介绍</view>
			<view class="tip">您身边开店的好助手</view>
			<button class="btn" @click="goJingang(2)">点击查看{{arrow}}</button>
		</view>
		<view class="item item3">
			<view class="title">推广素材</view>
			<view class="tip">热门海报素材应有尽有</view>
			<button class="btn" @click="goJingang(3)">点击查看{{arrow}}</button>
		</view> -->
	</view>
</template>

<script>
	import {
		frontMyArticleId
	} from '@/api/user.js';
	export default {
		data() {
			return {
				arrow:'>>>',
				list:[]
			}
		},
		onLoad() {
			this.getList()
		},
		methods: {
			getList(){
				frontMyArticleId().then(res=>{
					this.list = res.data
				})
			},
			goJingang(item) {
				uni.navigateTo({
					url: '/pages/platform/articleList/index?type='+item.id+'&name='+item.name
				});
			},
		}
	}
</script>

<style lang="scss">
	.body{
		min-height: 100vh;
		background: #EEF8FF;
		padding: 24rpx 32rpx;
		.item{
			background-repeat: no-repeat;
			background-size: 100% 100%;
			width: 100%;
			padding: 16rpx 24rpx;
			margin-bottom: 24rpx;
			
	}
	.item1{
		background-image: url('https://store-profit-system.oss-cn-shanghai.aliyuncs.com/shouye/home_guanyuwomen_icon-2.png');
		height: 204rpx;
	}
	.item2{
		background-image: url('https://store-profit-system.oss-cn-shanghai.aliyuncs.com/shouye/home_guanyuwomen_icon-1.png');
		height: 206rpx;
	}
	.item3{
		background-image: url('https://store-profit-system.oss-cn-shanghai.aliyuncs.com/shouye/home_guanyuwomen_icon.png');
		height: 206rpx;
	}
	.title{
			font-family: Alibaba PuHuiTi 2.0, Alibaba PuHuiTi 20;
			font-weight: 700;
			font-size: 40rpx;
			color: #2393FF;
		}
		.tip{
			font-weight: 500;
			font-size: 24rpx;
			color: #2393FF;
			margin-top: 10rpx;
		}
		.btn{
			width: 170rpx;
			height: 46rpx;
			line-height: 46rpx;
			text-align: center;
			background: #F4F4F4;
			border-radius: 24rpx;
			font-weight: 500;
			font-size: 24rpx;
			color: #2393FF;
			margin-top: 34rpx;
		}
	}
</style>
